// 亮色主题颜色
@mixin default{
  --border-color-primary:#ccc;
  --background-color-primary:#fff;
  --background-color-hover:#e7e7e7;
  --background-color-active:#e4e4e4;
  --color-primary:#2e2e2e;
  --color-active: #1b1b1b;
  --color-hover: #2b2828;

  --shadow-color:#00000021;

  // 滚动条
  --scrollbar-thumb-background-color:#00000083;
  --scrollbar-track-background-color:#e7e7e7;
}

// 暗色主题颜色
@mixin dark {
  --border-color-primary:#404040;
  --background-color-primary:#1e1e1e;
  --background-color-hover:#37373d;
  --background-color-active:#2a2d2e;
  --color-primary:#979797;
  --color-active: #ececec;
  --color-hover: #cfcfcf;

  --shadow-color:#afafaf21;

  // 滚动条
  --scrollbar-thumb-background-color:#ffffff83;
  --scrollbar-track-background-color:#4b4b4b;

}

.tezero-layout{
  --left-sidebar-width: 200px;
  --right-sidebar-width: 300px;
  --header-height: 40px;

  
  @include default;
  
  &.dark{
    
    @include dark;
  }

  background-color: var(--background-color-primary);
  color: var(--color-primary);
  width: 100%;
  height: 100%;
  display: flex;
  flex-wrap: nowrap;
  scrollbar-color: var();
  /* 滚动条 */
  ::-webkit-scrollbar {
    background-color: transparent;
    width: 6px;
  }
  /* 滚动条-按钮 */
  ::-webkit-scrollbar-button {
    background-color: var(--background-color-active);
    width: 6px;
    height: 6px;
  }
  /* 滚动条-轨道 */
  ::-webkit-scrollbar-track {
    background-color: var(--scrollbar-track-background-color);
  }
  /* 滚动条-滑块 */
  ::-webkit-scrollbar-thumb {
    box-shadow: inset 0 0 6px var(--scrollbar-thumb-background-color);
  }


  &-viewport{
    height: 100%;
    flex-basis: calc(100% - var( --left-sidebar-width) - var(--right-sidebar-width));
  }
  .tezero-left-sidebar{
    --padding:10px;
    width: var( --left-sidebar-width);
    height: 100%;
    box-sizing: border-box;
    overflow: auto;
    .group-name{
      font-size: 12px;
      height: var(--header-height);
      line-height: var(--header-height);
      border-top: 1px solid var(--border-color-primary);
      border-bottom: 1px solid var(--border-color-primary);
    }
    .group-items{
      display: flex;
      flex-wrap: wrap;
      justify-content: space-between;
      .group-item{
        box-sizing: border-box;
        padding: var(--padding);
        width: calc((100% - var(--padding) * 2) / 2);
        // height: 70px;
        display: flex;
        justify-content: center;
        vertical-align: middle;
        flex-direction: column;
        img{
          width: 60px;
          height: 60px;
        }
        span{
          font-size: 12px;
        }
        &:hover{
          color: var(--color-hover);
          background-color: var(--background-color-hover);
        }
      }
    }
  }

  .tezero-right-sidebar{
    --outline-height: 400px;
    width: var(--right-sidebar-width);
    .tezero-outliner,.tezero-layout-outliner{
      height: var(--outline-height);
      overflow: auto;

    }

    .tezero-tab{
      height: calc(100% - var(--outline-height) );
      .tezero-tab-header{
        height: var(--header-height);
        width: 100%;
        overflow: auto;
        border-top: 1px solid var(--border-color-primary);
        border-bottom: 1px solid var(--border-color-primary);
        &>span{
          cursor: pointer;
          display: inline-block;
          text-align: center;
          line-height: var(--header-height);
          width: 60px;
          color: var(--color-primary);
          &.active{
            background-color: var(--background-color-active);
            color: var(--color-active);
          }
          &:hover{
            background-color: var(--background-color-hover);
            color: var(--color-hover);
          }
        }
        
      }
      .tezero-tab-panel{
        height: calc(100% - var(--header-height));
        overflow: auto;
        display: none;
        &.active{
          display: block;
        }

      }
      
      

    }


  }
  .hide{
    display: none !important;
  }

  .tezero-btn{
    outline: none;
    background-color: var(--background-color-primary);
    border: 1px solid var(--border-color-primary);
    color: var(--color-primary);
    &:hover{
      background-color: var(--background-color-hover);
      color: var(--color-hover);
    }
    &:active{
      background-color: var(--background-color-active);
      color: var(--color-active);
    }
  }

  .tezero-select{
    color: var(--color-primary);
    position: relative;
    display: inline-block;
    .tezero-select-wrapper{
      border: 1px solid var(--background-color-active);
      box-sizing: border-box;
      color: var(--color-primary);
      input{
        outline: none;
        border: none;
        background-color:transparent;
      }
    }
    .tezero-select-ul{
      position: absolute;
      list-style: none;
      display: none;
      padding: 0;
      margin: 0;
      margin-top: 4px;
      z-index: 88;
      width: 100%;
      background-color: var(--background-color-primary);
      box-shadow: 0px 0px 12px var(--shadow-color);
      .tezero-select-li{
        cursor: pointer;
        padding: 4px 6px;
        &.selected{
          background-color: var(--background-color-active);
          color: var(--color-active);
        }
        &:hover{
          background-color: var(--background-color-hover);
          color: var(--color-hover);
        }
      }
    }
  }
  
  .tezero-row{
    width: 100%;
    display: flex;
    padding: 4px 6px;
    box-sizing: border-box;
    .tezero-text{
      font-size: 14px;
      color: var(--color-primary);
    }
    .tezero-text-title{
      cursor: default;
      width:90px;
      font-size: 14px;
      color: var(--color-primary);
    }
    .tezero-input{
      border: 1px solid var(--background-color-active);
      box-sizing: border-box;
      padding: 4px 6px;
      background-color:transparent;
      outline: none;
      color: var(--color-primary);
      &:focus{
        border-color: var(--border-color-primary);
      }
      &-color{
        width: 32px;
        @extend .tezero-input;
        padding: 0;
      }
      &-number{
        width: 60px;
        color: var(--color-primary);
        @extend .tezero-input;
      }
    }

    

    .tezero-textarea{
      @extend .tezero-input;
    }
  
  }

  .tezero-outliner{
    .opener {
      display: inline-block;
      width: 14px;
      height: 14px;
      margin: 0px 4px;
      vertical-align: top;
      text-align: center;
      &.open::after{
        content: '−';
      }
      &.closed:after {
        content: '+';
      }
    }
    .option {
      font-size: 14px;
      color: var(--color-primary);
      border: 1px solid transparent;
      &.active{
        background-color: var(--background-color-active);
        color: var(--color-active);
      }
      &:hover{
        background-color: var(--background-color-hover);
        color: var(--color-hover);
      }
      &.drag{
        border: 1px dashed var(--border-color-primary);
      }
      &.dragTop{
        border-top: 1px dashed var(--border-color-primary);//#999;
      }
      &.dragBottom{
        border-bottom: 1px dashed var(--border-color-primary);
      }
    }
  
    .type{
      display: inline-block;
      width: 14px;
      height: 14px;
      color: var(--color-primary);
      text-align: center;
      &:after{
        content: '●';
      }
    }
  
    .Scene {
      color: #8888dd;
    }
    .Light {
      color: #dddd88;
    }
    .Camera {
      color: #dd8888;
    }
    .Object3D {
      color: #aaaaee;
    }
    .Mesh {
      color: #8888ee;
    }
    .Line {
      color: #88ee88;
    }
    .LineSegments {
      color: #88ee88;
    }
    .Points {
      color: #ee8888;
    }
    .Geometry {
      color: #aaeeaa;
    }
    .Material {
      color: #eeaaee;
    }
    .Script:after {
      content: '◎'
    }
  
  }

}